const mongoose = require('mongoose')
const moment = require('moment')
const Schema = mongoose.Schema
const advSchema = new Schema({
  advTitle: {
    type: String,
    required: true,
  },
  advAvatar: {
    type: String,
    required: true,
  },
  advCategory: {
    type: String,
    required: true,
  },
  advLink: {
    type: String,
    required: true,
  },
  advInsertDate: {
    type: String,
    default: moment(Date.now()).format('YYYY-MM-DD HH:mm:ss'),
  },
  advMotifyDate: {
    type: String,
    default: moment(Date.now()).format('YYYY-MM-DD HH:mm:ss'),
  },
})

module.exports = mongoose.model('advs', advSchema)
